package timor.timor;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;


public class PhotoActivity extends ActionBarActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_photo);
        String filepath = getIntent().getStringExtra("filepath");
        BitmapFactory.Options options=new BitmapFactory.Options();
        options.inJustDecodeBounds=true;
         BitmapFactory.decodeFile(filepath,options);
        int outHeight = options.outHeight;
        int width=400;
        int s=outHeight/width;
        options.inSampleSize=s;
        options.inJustDecodeBounds=false;
        Bitmap bitmap = BitmapFactory.decodeFile(filepath, options);
        ImageView imageview = (ImageView) findViewById(R.id.picture_imageview);
        imageview.setImageBitmap(bitmap);


    }


}
